<!DOCTYPE HTML>
<html class="help-html">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>就诊人</title>
    <link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
    <link href="css/choose.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/aui.css" />
    <link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body class="help-body">
<div class="site-name">
  <p>北京114预约挂号平台</p>
</div>

<div class="add-container">
  <div class="add-wrapper">
    <div class="add-title">
      <h4>就诊人信息</h4>
    </div>

    <div class="add-list">
      <div class="add-item">
        <div class="add-left">
          <p>*就诊人姓名</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="patientName"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>证件类型</p>
        </div>
        <div class="add-right">
          <div class="add-input sele-bp-1">
            <p id="patientIdtype">居民身份证 </p>
          </div>
          <i class="aui-iconfont aui-icon-right"></i>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>证件号码</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="patientIdnumber"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>性别</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="sex"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>出生日期</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="birthday"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>民族</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="nation"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>婚姻状况</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="maritalStatus"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>户口所在地</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="hukou"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>当前住址</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="areaId"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>详细地址</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="detailedAddress"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>专程来京就医</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="whethertoCometobeijing"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>手机号</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="patientPhone"></p>
          </div>
        </div>
      </div>

    <div class="add-title">
      <h4>联系人信息</h4>
    </div>

    <div class="add-list">
      <div class="add-item">
        <div class="add-left">
          <p>*联系人姓名</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="contactName"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>联系人证件类型</p>
        </div>
        <div class="add-right">
          <div class="add-input sele-bp-3">
            <p >居民身份证</p>
          </div>
          <i class="aui-iconfont aui-icon-right"></i>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*联系人证件号码</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="contactIdnumber"></p>
          </div>
        </div>
      </div>

      <div class="add-item">
        <div class="add-left">
          <p>*联系人手机号</p>
        </div>
        <div class="add-right">
          <div class="add-input">
            <p id="contactPhone"></p>
          </div>
        </div>
      </div>

    </div>

    <div class="add-btn">
      <a id="update" href="javascript:;">编辑就诊人</a>
    </div>

      <div class=add-title">
        <a id="del">删除就诊人</a>
      </div>

  </div>
</div>

</body>
<script src="js/jquery.min.js"></script>
<script src="js/swiper.min.js"></script>
<script src="js/hSdrop.js"></script>
<script src="js/url.js"></script>
<script type="text/javascript">
	new hSdrop({
		els:'.sele-bp-1'
	})

  new hSdrop({
		els:'.sele-bp-2'
	})

  new hSdrop({
		els:'.sele-bp-3'
	})


    var id = location.href.split("=")[1];
    setOrder(id);
    function  setOrder(id) {
      $.ajax({
        type:"post",
        url:getUrl()+"wechat114/patient/selectBy",
        data:{"patientId":id},
        dataType:"json",
        success:function (data) {
          var msg = data.data;
          $("#patientName").html(msg.patientName);

          $("#patientIdnumber").html(msg.patientIdnumber);
          $("#sex").html(msg.sex);
          $("#nation").html(msg.nation);
          $("#birthday").html(msg.birthday);
          $("#patientPhone").html(msg.patientPhone);
          $("#areaId").html(msg.areaId);
          $("#detailedAddress").html(msg.detailedAddress);
          $("#whethertoCometobeijing").html(msg.whethertoCometobeijing);
          $("#contactName").html(msg.contactName);
          $("#contactIdnumber").html(msg.contactIdnumber);
          $("#contactPhone").html(msg.contactPhone);
          $("#hukou").html(msg.hukou);
          $("#maritalStatus").html(msg.maritalStatus);
          $("#patientIdtype").html(msg.patientIdtype)
          $("#del").click(function(){
            $.ajax({
              type:"post",
              url:getUrl()+"wechat114/patient/delete",
              data:{"patientId":msg.patientId},
              dataType:"json",
              success:function (data) {
                alert("删除成功")
                window.location.replace("user.html");
              }
            })
          })
          $("#update").click(function(){
            window.location.replace("update.html?patientId="+msg.patientId);
          })
        }
      })
    }




</script>
</html>
